From c6553c4cdeaf51b5c0ebbb059f329ddc7177f03f Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Tue, 16 Oct 2007 09:30:20 +0100 Subject: [PATCH] minios: Fix get_current() inline asm. From: Samuel Thibault Signed-off-by: Keir Fraser --- extras/mini-os/include/x86/arch_sched.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extras/mini-os/include/x86/arch_sched.h b/extras/mini-os/include/x86/arch_sched.h index e02dbd05a5..6bc47f89d3 100644 --- a/extras/mini-os/include/x86/arch_sched.h +++ b/extras/mini-os/include/x86/arch_sched.h @@ -7,9 +7,9 @@ static inline struct thread* get_current(void) { struct thread **current; #ifdef __i386__ - __asm__("andl %%esp,%0; ":"=r" (current) : "r" (~8191UL)); + __asm__("andl %%esp,%0; ":"=r" (current) : "0" (~8191UL)); #else - __asm__("andq %%rsp,%0; ":"=r" (current) : "r" (~8191UL)); + __asm__("andq %%rsp,%0; ":"=r" (current) : "0" (~8191UL)); #endif return *current; } -- 2.30.2